package com.boot.core.entity;/**
 * @description
 * @autor xbwu on 2018/5/14.
 */

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.SqlCondition;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant;
import lombok.Data;



/**
 * MP树形节点基类
 * @author xbwu
 * @create 2018-05-14 
 **/
@Data
public class BaseMPTreeEntity<T extends Model> extends BaseMpVersionEntity<T> {

    /**
     * 菜单名
     */
    @TableField(condition = SqlCondition.LIKE)
    @Column(name = "title",type = MySqlTypeConstant.VARCHAR,length = 100)
    protected String title;
    /**
     * 父节点id
     */
    @TableField(value="parent_node")
    @Column(name = "parent_node",type = MySqlTypeConstant.VARCHAR,length = 50)
    protected String parentNode;

    /**
     * 完整父节点路径id，以分号作为分隔符，不包含自己
     */
    @TableField(value="full_parent_node",fill = FieldFill.INSERT_UPDATE)
    @Column(name = "full_parent_node",type = MySqlTypeConstant.VARCHAR,length = 1000)
    protected String fullParentNode;
    /**
     * 节点url
     */
    @Column(name = "url",type = MySqlTypeConstant.VARCHAR)
    protected String url;

    /**
     * 节点内容
     */
    @Column(name = "content",type = MySqlTypeConstant.VARCHAR)
    protected String content;
    /**
     * 节点等级（根节点为0，菜单目前只支持到级别：3）
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @Column(name = "level",type = MySqlTypeConstant.INT)
    protected Integer level;

}
